/**
 * 
 */
package com.sci.web.daoimpl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.sci.web.bean.Enterprise_Reward;

/**
 * @author  BaiFuyou
 * @date: Nov 5, 2011 4:32:49 PM
 */
public class DataReportM_RewardDao extends SqlMapClientDaoSupport implements com.sci.web.dao.DataReportM_RewardDao {

	/* (non-Javadoc)
	 * @see com.sci.web.dao.DataReportM_RewardDao#getAllEnterpriseRewardByUid(int)
	 */
	@SuppressWarnings("unchecked")
	@Override
	public List<Enterprise_Reward> getAllEnterpriseRewardByUid(int uid) {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().queryForList("datereportseason.getallrewardbyuid",uid);
	}

	@Override
	public int getEnterpriseIdByUid(int uid) {
		// TODO Auto-generated method stub
		return (Integer)super.getSqlMapClientTemplate().queryForObject("datereportseason.getenid",uid);
	}

	@Override
	public boolean insertNewEnterpriseReward(Enterprise_Reward er) {
		// TODO Auto-generated method stub
		return (Integer)super.getSqlMapClientTemplate().insert("datereportseason.insertnewenterreward",er)>0?true:false;
	}

	@Override
	public boolean updateEnterpriseReward(Enterprise_Reward er) {
		// TODO Auto-generated method stub
		return (Integer)super.getSqlMapClientTemplate().update("datereportseason.updateenreward",er)>0?true:false;
	}

}
